package pack0622;

public class b {
    public static void main(String[] args) {
        int[][] b = new int[5][5];
        for (int i = 0; i < b.length; i++) {
            b[i][0] = 1;
            b[i][i] = 1;
        }
            for (int i = 2; i < b.length; i++) {
                for (int j = 1; j < i; j++) {
                    b[i][j] = b[i - 1][j - 1] + b[i - 1][j];
                }
            }
            for (int i=0;i<b.length;i++){
                for (int j=0;j<=i;j++)
                    System.out.print(b[i][j]+" ");
                    System.out.println();
            }
        }
    }

